# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=incron
pkgver=0.5.10
pkgrel=0
pkgdesc="Inotify cron system"
url="http://inotify.aiken.cz"
arch="all"
license="GPL-2.0"
makedepends="argp-standalone"
subpackages="$pkgname-doc"
options="suid"
source="http://inotify.aiken.cz/download/incron/incron-$pkgver.tar.bz2
	fix-headers.patch
	incrond.initd
	incron-aarch64.patch
	"
builddir="$srcdir/incron-$pkgver"

build() {
	cd "$builddir"
	make PREFIX=/usr
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" PREFIX=/usr install
	install -Dm755 "$srcdir"/incrond.initd "$pkgdir"/etc/init.d/incrond
	install -Dm644 incron.conf.example "$pkgdir"/etc/incron.conf
}

sha512sums="5d9ae4d4e3929ba16ad06652f21ef319041e13f9b15000d08053a973bef706b5d0137b9235c29049aed1673a2f41379b2b677eeedefacaf68308ad54405e4bfd  incron-0.5.10.tar.bz2
ab25665b6b736b81bfa84b1092608e0f2c15484a2e920b1859827bd870d04a894760020be6ab27226ff8cb75bab1ef8dc34d006a4531fc658e32137374412c9c  fix-headers.patch
458d5a4e9ab062b3e9a7dddf46c25bae431ec6c93862304f444e94cfb41b28e9ae21d5e621e94ce9cf55b26878d8fe978c19eeaa473779772a24adf709fd4cd8  incrond.initd
46af5174748bec8ddad84f43b00a4b10f3bed3af2884fa4106797e96e2ea1be399642c049760035635275354a4a66d1ce33c58e6856bda3e98054c8627277287  incron-aarch64.patch"
